package bg.btanev.eightyfour.gwtfacade.converter;

/**
 *
 * @author B.Tanev
 *
 */
public final class ConverterFactory {

	private ConverterConfiguration configuration;

	public ConverterFactory() {
	}

	public void setConfiguration(ConverterConfiguration configuration) {
		this.configuration = configuration;
	}

	public DtoConverter getConverter() {
		if (this.configuration == null) {
			throw new IllegalStateException("Converter configuration not set.");
		}

		return new DtoConverterImpl(this.configuration);
	}
}
